#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
	vector <int> vec;
	vec.push_back(1);
	vec.push_back(2);
	vec.push_back(3);
	vec.push_back(4);

	cout << "the container of the vector are : " << endl;

	vector<int>::iterator iVce = vec.begin();
	while(iVce != vec.end())
	{
		cout << *iVce << endl;
		++ iVce;
	}
	vector<int>::iterator iEle = find(vec.begin() , vec.end() , 1);
	if(iEle != vec.end())
	{
		int p = distance(vec.begin() , iEle);
		cout << "Value " << *iEle;
		cout << " found in the vector at p : " << p << endl;
	}
}

